﻿<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta charset="UTF-8" />  
    <meta name="viewport" content="initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <title>杀虫灯系统平台</title>  
    <link rel="stylesheet" type="text/css" href="easyui/themes/metro/easyui.css" />  
    <link rel="stylesheet" type="text/css" href="easyui/themes/mobile.css" />  
    <link rel="stylesheet" type="text/css" href="easyui/themes/icon.css" />  
    <script type="text/javascript" src="easyui/jquery.min.js"></script>  
    <script type="text/javascript" src="easyui/jquery.easyui.min.js"></script> 
    <script type="text/javascript" src="easyui/jquery.easyui.mobile.js"></script>
    <script type="text/javascript">

        $(function () {            
            $("#mybtn").click(function () {
                var paramData = {};
                paramData.username = $("#username").val();
                paramData.password = $("#password").val();                
                loginSys(paramData);
            });
        });
        //登陆操作
        function loginSys(paramData) {
            $.ajax({
                url: "../ashx/Login.ashx?Method=LoginMoblie",
                data: paramData,
                dataType:"json",
                beforeSend: function (xhr) {
                    return $('#lfrm').form('validate');
                },
                success: function (json) {
                    switch (json.isOk) {
                        case 1:
                            window.location.href = "main.aspx";
                            break;
                        case 0:
                            showError(json.message);
                            break;
                    }
                },
                error: function () {
                    showError('获取账号信息失败...请联系管理员!');
                }
            });
        }
    </script> 
    
</head>
<body>
    <div class="easyui-navpanel">
        <header>
            <div class="m-toolbar">
                <span class="m-title">杀虫灯系统平台登录</span>
            </div>
        </header>
        <div style="margin:20px auto;width:100px;height:100px;overflow:hidden">            
            <img src="../Images/loginico.png" style="margin:0;width:100%;height:100%;"/>
        </div>
        <div style="padding:0 20px">
            <form id="lfrm">
            <div style="margin-bottom:10px">
                <input id="username" class="easyui-textbox" data-options="prompt:'输入用户名',iconCls:'icon-man'" style="width:100%;height:38px">
            </div>
            <div>
                <input id="password" class="easyui-passwordbox" data-options="prompt:'输入密码'" style="width:100%;height:38px">
            </div>
            <div style="text-align:center;margin-top:30px">
                <a id="mybtn" href="#" class="easyui-linkbutton" style="width:100%;height:40px"><span style="font-size:16px">登录</span></a>
            </div>  
                </form>          
        </div>
    </div>
</body>
</html>
